package com.wanxi.test;
//二维数组，所有元素的和
public class SumTwoArray {
    public static void main(String[] args) {
        int[][] array = {{4, 5, 6, 7}, {1, 2, 5, 1}, {2, 6, 10}};
        int length = array.length;
        int sum = 0;

        for (int i = 0; i < length; i++) {

            for (int j = 0; j < array[i].length; j++) {

                sum += array[i][j];

            }

        }

        System.out.println("和为： " + sum);

    }
}
